import { http } from '@/utils/http'

/** 项目接口 */

// 获取用户卡的信息
export const getCardByUserId = (data: object) => {
  return http.post('/sportCardApi/card/ocCard/getCardByUserId', data)
}

// 一卡通充值接口
export const topUp = (data: object) => {
  return http.post('/sportCardApi/card/ocCard/topUp', data)
}

// 获取充值列表
export const pageCardIn = (data: object) => {
  return http.post('/sportCardApi/card/ocCard/pageCardIn', data)
}

// 一卡通退款
export const refund = (data: object) => {
  return http.post(`/sportCardApi/pay/refund/${data.inOrderPayNo}`)
}

// 商户支付
export const qrCodePay = (data: object) => {
  return http.post(`/sportCardApi/pay/qrCodePay`, data)
}

//获取消费列表
export const pageCardOut = (data: object) => {
  return http.post(`/sportCardApi/card/ocCard/pageCardOut`, data)
}